﻿@model MobilnyDostawca.ViewModels.SubregionyEditViewModel

@{
    ViewBag.Title = "Zmiana dostawcy";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Zmiana dostawcy</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Subregion</legend>

        @*@Html.HiddenFor(model => model.)*@
        <div class="display-label">Nazwa</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Subregion)
        </div>
        <div class="display-label">Region</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.Region)
        </div>
        <div class="display-label">Poprzedni dostawca</div>
        <div class="display-field">
            @Html.DisplayFor(model => model.PoprzedniDostawca)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.Dostawca, "Nowy dostawca")
            </div>
            <div class="editor-field">
                @Html.DropDownList("Dostawca", Model.Dostawcy, string.Empty, new { id = "DostawcaID" })
                @Html.ValidationMessageFor(model => model.Dostawca)
            </div>

        <p>
            <input type="submit" value="Zmień dostawcę" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Wróć do listy", "Index")
</div>
